home *** CD-ROM | disk | FTP | other *** search
- 10 REM WEIGHT ANALYSIS PROGRAM Version 1.0, written 3/23/86
- 20 REM BY SAM Y. ARAI
- 30 REM THE DATA IS TAKEN FROM FISHBEIN'S ILLUSTRATED MEDICAL AND HEALTH ENCYCLOPEDIA
- 35 REM The data in this program is for people over the age of 25.
- 37 REM For girls between 18 and 25, subtract 1 pound for each year
- 38 REM under the age of 25.
- 40 CLS:KEY OFF
- 50 FOR X=1 TO 9:PRINT:NEXT X:PRINT TAB(33);"Weight Analysis"
- 60 PRINT TAB(35);"Version 1.0":PRINT TAB(33);"March 23, 1986":PRINT:PRINT TAB(34);"by Sam Y.Arai"
- 70 PRINT:PRINT:INPUT "Hit <CR> to continue";A$
- 80 CLS:CLEAR
- 100 PRINT"ARE YOU MALE OF FEMALE? (Hit M or male, F for female)"
- 110 A$=INKEY$:IF A$="" THEN 110
- 120 IF A$="m" OR A$="M" THEN A=0:PRINT "Male":GOTO 150
- 130 IF A$="f" OR A$="F" THEN A=1:PRINT "Female":GOTO 150
- 140 GOTO 110
- 150 PRINT:PRINT "How tall are you? (Enter Feet,Inches)"
- 160 INPUT F,I
- 170 IF F<4 OR F>6 OR A=0 AND F=5 AND I<2 OR A=0 AND F=6 AND I>4 OR A=1 AND F=4 AND I<10 OR A=1 AND F=6 AND I>0 THEN 190
- 172 PRINT:PRINT"How many pounds do you weigh?"
- 174 INPUT W
- 180 GOTO 200
- 190 PRINT"I'm sorry, but you are either too short or too tall"
- 195 PRINT"for this program's database to analyze your weight.":STOP
- 200 PRINT:PRINT"Do you have a Small, Medium, or Large Frame?"
- 210 PRINT"(Hit S,M,or L key)"
- 220 A$=INKEY$:IF A$="" THEN 220
- 230 IF A$="s" OR A$="S" THEN S=0:PRINT"Small":GOTO 270
- 240 IF A$="m" OR A$="M" THEN S=1:PRINT"Medium":GOTO 270
- 250 IF A$="l" OR A$="L" THEN S=2:PRINT"Large":GOTO 270
- 260 GOTO 220
- 270 IF A=1 THEN A=45:GOTO 300
- 280 A=(F-5)*36+(I-2)*3+S
- 290 GOTO 310
- 300 A=A+(F-4)*36+(I-10)*3+S
- 310 FOR X=1 TO A:READ L,U:NEXT X
- 320 READ L,U
- 330 IF W=>L AND W<=U THEN Z=0
- 340 IF W<L THEN Z=1
- 350 IF W>U THEN Z=2
- 360 PRINT:IF Z=0 THEN PRINT"Your weight is in the desirable weight category."
- 370 IF Z=1 THEN PRINT"You are"L-W"pounds under what is considered the desirable weight range."
- 380 IF Z=2 THEN PRINT"You are"W-U"pounds over what is considered the desirable weight range."
- 390 PRINT"You should weigh between"L"and"U"pounds."
- 400 PRINT:IF Z=0 THEN PRINT"Keep up the good work!"
- 410 IF Z=1 THEN PRINT"You should probably eat more and exercise to gain weight."
- 420 IF Z=2 THEN PRINT"You should eat less fattening foods and exercise to lose weight."
- 430 PRINT:PRINT"Thank you for using this program!"
- 440 PRINT"Version 1.1 with more feature to come soon!"
- 1000 DATA 112,120,118,129,126,141
- 1010 DATA 115,123,121,133,129,144
- 1020 DATA 118,126,124,136,132,148
- 1030 DATA 121,129,127,139,135,152
- 1040 DATA 124,133,130,143,138,156
- 1050 DATA 128,137,134,147,142,161
- 1060 DATA 132,141,138,152,147,166
- 1070 DATA 136,145,142,156,151,170
- 1080 DATA 140,150,146,160,155,174
- 1090 DATA 144,154,150,165,159,179
- 1100 DATA 148,158,154,170,164,184
- 1110 DATA 152,162,158,175,168,189
- 1120 DATA 156,167,162,180,173,194
- 1130 DATA 160,171,167,185,178,199
- 1140 DATA 164,175,172,190,182,204
- 1150 DATA 92,98,96,107,104,119
- 1160 DATA 94,101,98,110,106,122
- 1170 DATA 96,104,101,113,109,125
- 1180 DATA 99,107,104,116,112,128
- 1190 DATA 102,110,107,119,115,131
- 1200 DATA 105,113,110,122,118,134
- 1210 DATA 108,116,113,126,121,138
- 1220 DATA 111,119,116,130,125,142
- 1230 DATA 114,123,120,135,129,146
- 1240 DATA 118,127,124,139,133,150
- 1250 DATA 122,131,128,143,137,154
- 1260 DATA 126,135,132,147,141,158
- 1270 DATA 130,140,136,151,145,163
- 1280 DATA 134,144,140,155,149,168
- 1290 DATA 138,148,144,159,153,173
- 1300 END
-